package com.fhz.mvvm.ui.login;

import androidx.lifecycle.LiveData;

import com.fhz.mvvm.callback.ApiResponse;
import com.fhz.mvvm.entity.HUser;
import com.fhz.mvvm.ui.login.datasource.LoginLocalDataSource;
import com.fhz.mvvm.ui.login.datasource.LoginRemoteDataSource;

import javax.inject.Inject;

import retrofit2.http.Body;

/**
 * 时间:2023/8/21
 *
 * @author Mr.Feng
 * 简述:
 */
public class LoginRepository {
    @Inject
    LoginLocalDataSource mLoginLocalDataSource;
    @Inject
    LoginRemoteDataSource mLoginRemoteDataSource;

    @Inject
    public LoginRepository(LoginLocalDataSource loginLocalDataSource, LoginRemoteDataSource loginRemoteDataSource) {
        mLoginLocalDataSource = loginLocalDataSource;
        mLoginRemoteDataSource = loginRemoteDataSource;
    }
    public LiveData<ApiResponse<HUser>> register(@Body HUser hUser){
        return mLoginRemoteDataSource.register(hUser);
    }
}
